package cn.tedu.warehouse.controller;

import cn.tedu.warehouse.entity.Brand;
import cn.tedu.warehouse.entity.Result;
import cn.tedu.warehouse.entity.Store;
import cn.tedu.warehouse.service.StoreService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RequestMapping("/transshipment")
@RestController
public class TransshipmentController {
    @Autowired
    private StoreService storeService;

    /**
     * 查询所有仓库的url接口/transshipment/store-list
     *
     * 返回值Result对象给客户端响应查询到的List<Store>;
     */
    @RequestMapping("/store-list")
    //@RequestMapping("/product-page-list")
    public Result storeList(){
        //执行业务
        List<Store> storeList = storeService.queryAllStore();
        //响应
        return Result.ok(storeList);
    }
}
